import mediaoldrequest from '@/utils/media-old-request'
import mediarequest from '@/utils/media-request'

export function getRelMedias(data) {
  return mediarequest({
    url: '/console/medias',
    method: 'get',
    params: data
  })
}

export function getMedias(data) {
  return mediarequest({
    url: '/console/group/medias',
    method: 'get',
    params: data
  })
}

export function getReviewSeries(data) {
  return mediarequest({
    url: '/console/seriess',
    method: 'get',
    params: data
  })
}

export function getSeries(data) {
  return mediarequest({
    url: '/media/seriess',
    method: 'get',
    params: data
  })
}


/*export function createMedia(data) {
  return mediaoldrequest({
    url: '/corp/media/create',
    method: 'post',
    data: data
  })
}*/
export function createMedia(data) {
  return mediarequest({
    url: '/console/media',
    method: 'post',
    data: data
  })
}
export function editMedia(data) {
  return mediarequest({
    url: '/console/media',
    method: 'put',
    data: data
  })
}
export function deleteMedia(data) {
  return mediarequest({
    url: '/console/media',
    method: 'delete',
    data: data
  })
}
/*
export function editMedia(id, data) {
  return mediaoldrequest({
    url: '/corp/media/update/'+id,
    method: 'post',
    data: data
  })
}*/

export function getMediaInfo(data) {
  return mediarequest({
    url: '/console/media',
    method: 'get',
    params: data
  })
}

export function getSearchSuggest(data) {
  return mediaoldrequest({
    url: '/corp/media/search/suggest/list',
    method: 'get',
    params: data
  })
}

export function getSeriesInfo(data) {
  return mediarequest({
    url: '/media/series',
    method: 'get',
    params: data
  })
}

export function getMediaVideos(data) {
  return mediarequest({
    url: '/media/videos',
    method: 'get',
    params: data
  })
}

export function getMediaRefImage(data) {
  return mediarequest({
    url: '/console/media/rel/imgids',
    method: 'get',
    params: data
  })
}

export function mediaRefImage(data) {
  return mediarequest({
    url: '/media/rel/images',
    method: 'post',
    data
  })
}

export function deleteMediaRefImage(data) {
  return mediarequest({
    url: '/media/rel/image',
    method: 'delete',
    data
  })
}

export function seriesRefVideos(data) {
  return mediarequest({
    url: '/console/media/series/rel/videos',
    method: 'get',
    params: data
  })
}

export function editMediaRefImageSort(data) {
  return mediarequest({
    url: '/media/rel/image',
    method: 'patch',
    data
  })
}

export function getSeriesRelImages(data) {
  return mediarequest({
    url: '/console/media/series/rel/imgids',
    method: 'get',
    params: data
  })
}

export function seriesRelImages(data) {
  return mediarequest({
    url: '/media/series/rel/images',
    method: 'post',
    data
  })
}

export function deleteSeriesRelImage(data) {
  return mediarequest({
    url: '/media/series/rel/image',
    method: 'delete',
    data
  })
}

export function editSeriesRelImageSort(data) {
  return mediarequest({
    url: '/media/series/rel/image',
    method: 'patch',
    data
  })
}

export function editMediaRefVideoSort(data) {
  return mediarequest({
    url: '/media/rel/video',
    method: 'patch',
    data
  })
}

export function deleteMediaRefVideo(data) {
  return mediarequest({
    url: '/media/rel/video',
    method: 'delete',
    data
  })
}

export function editSeriesRefVideoSort(data) {
  return mediarequest({
    url: '/media/series/rel/video',
    method: 'patch',
    data
  })
}

export function deleteSeriesRefVideo(data) {
  return mediarequest({
    url: '/media/series/rel/video',
    method: 'delete',
    data
  })
}

export function getGroupList(data) {
  return mediarequest({
    url: '/console/groups',
    method: 'get',
    params: data
  })
}

export function getGroupStatistics(data) {
  return mediarequest({
    url: '/console/groups/statistics',
    method: 'get',
    params: data
  })
}

export function mediasOnOff(data) {
  return mediarequest({
    url: '/console/media/onoff',
    method: 'post',
    data: data
  })
}

export function mediasRelPackages(data) {
  return mediarequest({
    url: '/console/media/rel/packages',
    method: 'put',
    data: data
  })
}

export function getMediaReledImageFids(data) {
  return mediarequest({
    url: '/console/media/rel/imagefids',
    method: 'get',
    params: data
  })
}

export function cloudStorageImagesImport(data) {
  return mediarequest({
    url: '/console/cloudstorage/images/import',
    method: 'post',
    data
  })
}

export function cloudStorageVideosImport(data) {
  return mediarequest({
    url: '/console/cloudstorage/videos/import',
    method: 'post',
    data
  })
}

export function mediaRelImages(data) {
  return mediarequest({
    url: '/console/material/images/rel/media',
    method: 'post',
    data
  })
}

export function seriesRelImageMediums(data) {
  return mediarequest({
    url: '/console/material/images/rel/series',
    method: 'post',
    data
  })
}

export function getSeriesReledImages(data) {
  return mediarequest({
    url: '/console/media/series/rel/imagefids',
    method: 'get',
    params: data
  })
}

export function getMediaReledVideoFids(data) {
  return mediarequest({
    url: '/console/media/rel/videofids',
    method: 'get',
    params: data
  })
}

export function getMediaReledVideoids(data) {
  return mediarequest({
    url: '/console/media/rel/videoids',
    method: 'get',
    params: data
  })
}

export function mediaRelVideos(data) {
  return mediarequest({
    url: '/console/material/videos/rel/media',
    method: 'post',
    data
  })
}

export function getSeriesReledVideoFids(data) {
  return mediarequest({
    url: '/console/media/series/rel/videofids',
    method: 'get',
    params: data
  })
}

export function getSeriesReledVideoids(data) {
  return mediarequest({
    url: '/console/media/series/rel/videoids',
    method: 'get',
    params: data
  })
}

export function seriesRelVideos(data) {
  return mediarequest({
    url: '/console/material/videos/rel/series',
    method: 'post',
    data
  })
}

